package com.atdel.demo27;


/**
 * @BelongsProject: java_study
 * @BelongsPackage: com.atdel.demo27
 * @Author: Del
 * @CreateTime: 2025-03-25  19:14
 * @Description: TODO
 * @Version: 1.0
 */
public class GenericDemo {
    public static void main(String[] args) {
        People<Dog> people1 = new People<>("张三", new Dog("小狗-旺财"));
        People<Cat> people2 = new People<>("李四", new Cat("小猫-蔡旺"));
        People<Snake> people3 = new People<>("王五", new Snake("宠物蛇-小花"));

        people1.shopping();
        people1.show();
        System.out.println("**************************************");

        people2.shopping();
        people2.show();
        System.out.println("**************************************");

        people3.shopping();
        people3.show();
    }
}
